<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/Chianti.Service.Types" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/Chianti.Service.Types" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import schemaLocation="http://localhost:63349/DealManagementService.svc?xsd=xsd4" namespace="http://schemas.datacontract.org/2004/07/System.Data.Linq" />
  <xs:complexType name="Business">
    <xs:sequence>
      <xs:element minOccurs="0" name="ID" type="xs:long" />
      <xs:element minOccurs="0" name="Name" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="StreetAddress" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="City" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="State" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="ZipCode" type="xs:int" />
      <xs:element minOccurs="0" name="Longitude" type="xs:double" />
      <xs:element minOccurs="0" name="Latitude" type="xs:double" />
      <xs:element minOccurs="0" name="Deals" nillable="true" type="tns:ArrayOfDeal">
        <xs:annotation>
          <xs:appinfo>
            <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:element name="Business" nillable="true" type="tns:Business" />
  <xs:complexType name="ArrayOfDeal">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Deal" nillable="true" type="tns:Deal" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfDeal" nillable="true" type="tns:ArrayOfDeal" />
  <xs:complexType name="Deal">
    <xs:sequence>
      <xs:element minOccurs="0" name="ID" type="xs:long" />
      <xs:element minOccurs="0" name="BusinessID" type="xs:long" />
      <xs:element minOccurs="0" name="CreationDate" type="xs:dateTime" />
      <xs:element minOccurs="0" name="ExpiryDate" type="xs:dateTime" />
      <xs:element xmlns:q1="http://schemas.datacontract.org/2004/07/System.Data.Linq" minOccurs="0" name="Image" nillable="true" type="q1:Binary" />
      <xs:element minOccurs="0" name="Video" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="Title" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="Description" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="IsActive" nillable="true" type="xs:boolean" />
      <xs:element minOccurs="0" name="DealBids" nillable="true" type="tns:ArrayOfDealBid">
        <xs:annotation>
          <xs:appinfo>
            <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="DealMetrics" nillable="true" type="tns:ArrayOfDealMetric">
        <xs:annotation>
          <xs:appinfo>
            <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:element name="Deal" nillable="true" type="tns:Deal" />
  <xs:complexType name="ArrayOfDealBid">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="DealBid" nillable="true" type="tns:DealBid" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfDealBid" nillable="true" type="tns:ArrayOfDealBid" />
  <xs:complexType name="DealBid">
    <xs:sequence>
      <xs:element minOccurs="0" name="ID" type="xs:long" />
      <xs:element minOccurs="0" name="DealID" type="xs:long" />
      <xs:element minOccurs="0" name="Date" type="xs:dateTime" />
      <xs:element minOccurs="0" name="Bid" type="xs:double" />
      <xs:element minOccurs="0" name="Radius" type="xs:int" />
      <xs:element minOccurs="0" name="IsActive" type="xs:boolean" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="DealBid" nillable="true" type="tns:DealBid" />
  <xs:complexType name="ArrayOfDealMetric">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="DealMetric" nillable="true" type="tns:DealMetric" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfDealMetric" nillable="true" type="tns:ArrayOfDealMetric" />
  <xs:complexType name="DealMetric">
    <xs:sequence>
      <xs:element minOccurs="0" name="ID" type="xs:long" />
      <xs:element minOccurs="0" name="DealID" type="xs:long" />
      <xs:element minOccurs="0" name="NumViews" nillable="true" type="xs:long" />
      <xs:element minOccurs="0" name="NumPlannedVisits" nillable="true" type="xs:long" />
      <xs:element minOccurs="0" name="NumActualVisits" nillable="true" type="xs:long" />
      <xs:element minOccurs="0" name="RevenueGenerated" nillable="true" type="xs:double" />
      <xs:element minOccurs="0" name="NumShared" nillable="true" type="xs:long" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="DealMetric" nillable="true" type="tns:DealMetric" />
  <xs:complexType name="CreateDealResponse">
    <xs:sequence>
      <xs:element minOccurs="0" name="CompetingBids" nillable="true" type="tns:ArrayOfBid" />
      <xs:element minOccurs="0" name="DealID" type="xs:long" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="CreateDealResponse" nillable="true" type="tns:CreateDealResponse" />
  <xs:complexType name="ArrayOfBid">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Bid" nillable="true" type="tns:Bid" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfBid" nillable="true" type="tns:ArrayOfBid" />
  <xs:complexType name="Bid">
    <xs:sequence>
      <xs:element minOccurs="0" name="BidAmount" type="xs:double" />
      <xs:element minOccurs="0" name="Distance" type="xs:double" />
      <xs:element minOccurs="0" name="ExpiryDate" type="xs:dateTime" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="Bid" nillable="true" type="tns:Bid" />
  <xs:complexType name="UpdateDealBidResponse">
    <xs:sequence>
      <xs:element minOccurs="0" name="CompetingBids" nillable="true" type="tns:ArrayOfBid" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="UpdateDealBidResponse" nillable="true" type="tns:UpdateDealBidResponse" />
  <xs:complexType name="Position">
    <xs:sequence>
      <xs:element minOccurs="0" name="Degrees" type="xs:int" />
      <xs:element minOccurs="0" name="Minutes" type="xs:int" />
      <xs:element minOccurs="0" name="Seconds" type="xs:double" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="Position" nillable="true" type="tns:Position" />
  <xs:complexType name="ArrayOfBusiness">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Business" nillable="true" type="tns:Business" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfBusiness" nillable="true" type="tns:ArrayOfBusiness" />
</xs:schema>